﻿<System.Management.Automation.Cmdlet("Get", "ChildCultureInfo")> _
Public Class GetChildCultureInfoCommand
    Inherits System.Management.Automation.Cmdlet

    <System.Management.Automation.Parameter(Mandatory:=True)> _
    Public Property ParentCultureName() As String

    Protected Overrides Sub BeginProcessing()

        If Me.ParentCultureName Is Nothing Then
            Me.WriteVerbose("Parent Name is not specified.")
        End If

        For Each C As System.Globalization.CultureInfo In System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures)
            If C.Parent.Name = ParentCultureName Then
                Me.WriteObject(C)
            End If
        Next
    End Sub
End Class
